// Copyright (C) ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
//
// $Id: exception.hpp 225 2008-09-12 17:43:02Z heavyzheng $
//

#ifndef ZZHENG_QUANT_DATES_EXCEPTION_HPP_20080811__
#define ZZHENG_QUANT_DATES_EXCEPTION_HPP_20080811__

#include <zzheng/quant/dates/config.hpp>
#include <exception>
#include <string>

namespace zzheng {
namespace quant {
namespace dates {

    class date_error: public std::exception {

    public:

        explicit date_error(): what_() {
            // Do nothing.
        }

        explicit date_error(const char* what): what_(what) {
            // Do nothing.
        }

        virtual ~date_error() throw() {
            // Do nothing.
        }

        virtual const char* what() const throw() {
            return what_.c_str();
        }

    private:

        std::string what_;

    }; // class date_error

} // namespace zzheng::quant::dates
} // namespace zzheng::quant
} // namespace zzheng

#endif // ZZHENG_QUANT_DATES_EXCEPTION_HPP_20080811__



